<?php

/**
 * Holds class DataMapper
 *
 * @author Mark
 *
 * @package Library
 */

/**
 * Data mapper base
 *
 * @deprecated
 * @author Mark
 * @author daantimmer
 */
class DataMapper {
	
	protected $table;


	protected $name = false;
	
	/**
	 * Database resource
	 * @var Database $db
	 */
	protected $db;

	/**
	 * Constructor
	 *
	 * @param Database $db
	 * @return void
	 */
	public function __construct(Database $db) {
		$this->db = $db;
		
		if($this->name !== false) $this->table = new DBTable($db,$this->name);
	}

	/**
	 * Returns database resource
	 *
	 * @return Database
	 */
	protected function getDb() {
		return $this->db;
	}
}
